1. Field of the Invention
The present invention relates generally to communications among a processor and one or more entities, and more particularly to a system and method for determining parameters of a communication to enable set-up of a communication link.
2. Related Art
Since the advent of microprocessors, computers and processor-based systems have become an increasingly integral part of our contemporary society. In fact, the microprocessor has enabled a proliferation of new consumer-related products that play an important role in the day-to-day lives of millions of people throughout the world. For example, the realization of low-cost, relatively fast, mass-producible processors has led to the introduction of affordable consumer items such as, for example, calculators, personal computers, and electronic organizers, just to name a few.
Additionally, the microprocessor has enabled other more conventional consumer products to experience an evolution in features and capabilities, beyond those originally anticipated. In fact, numerous consumer products developed or in existence prior to the proliferation of microprocessors have been enhanced or improved by the addition of one or more processors. Such products include, for example, automobiles, telephones, appliances, televisions, stereo components, and other consumer products. This evolution has not been limited to consumer products, but has also enabled the enhancement of commercial and military products as well.
With the proliferation of microprocessors and their ability to process and handle relatively large amounts of data came the desire to share data among processors or computing systems at other remote locations. One communication device used to facilitate communications among two or more processors is the modem. The modem allows computers and processor-based systems to communicate data and other information across an analog medium such as a telephone line. To facilitate communications between processors and processor-based systems and other entities, UARTs (universal asynchronous receiver/transmitter) and USARTs (universal synchronous asynchronous receiver/transmitter) are commonly used. In order for the UARTs and USARTs to handle communications between a processor and one or more external entities, the UART or USART being used must be programmed with parameters of the communication to be established.
However, many contemporary consumer-related products are called upon to perform real-time operational functions. For example, GSM handsets may be called upon to perform real-time tasks such as location determination, network registration, user interface, call data processing, and the like. As such, asking the processor to perform the functions of detecting the communication parameters and configuring the USART would impair the processor""s ability to perform the real-time functions. Additionally, the addition of a co-processor to perform these functions would require the additional cost of the co-processor to be incurred, or be more expensive in terms of chip space.
The present invention is directed toward a system and method for facilitating the establishment of communications between a processor or processor-based system and another processor, processor-based system, or other entity. Preferably, in one embodiment, the invention provides a parameter detection module that is configured to determine or detect communication parameters from a portion of a communication received from, for example, a data terminal equipment (DTE) or other entity. For example, in one embodiment, the parameter detection module detects the data rate of the communication. In another example, the communication between the processor or processor-based system and the other entity is a modem type AT compatible communication that utilizes AT modem commands. In this example application, the parameter detection module is configured to detect the baud rate of the communication and also to detect the parity and number of stop bits in the communication format being established. The parameter detection module can be implemented using hardware, firmware, or a combination thereof. In one embodiment, registers provided within the parameter detection module are capable of being reconfigured using software or firmware.
In one embodiment of this application, a reference clock is provided to the parameter detection module. The parameter detection module utilizes the reference clock to trigger a counter, which counts the number of clock pulses during a valid bit time. Preferably, in one embodiment, the valid bit time is the duration of the start bit received from the other entity. The count value obtained at the end of the bit time is compared with one or more valid bit times to determine the data rate or baud rate of the communication.
In one embodiment, this rate information is provided to a precision time generator. The precision time generator uses this determination to generate the appropriate timing signals for the receiver/transmitter. Specifically, the precision time generator provides a timing signal at the correct rate for the communication being established such that a receiver/transmitter can send data to and receive data from the other entity.
To detect the other communication parameters, in one embodiment, the parameter detection module evaluates the first one or more characters received. For example in the case of AT compatible communications, the parameter detection module evaluates the first two characters to determine which of a plurality of valid AT commands has been received. In one embodiment, the parameter detection module compares a series of received bits corresponding to one or more characters with stored bit sequences for possible valid characters to determine whether any valid characters have been received.
If one or more valid characters have been received, these valid characters are evaluated to determine the communication parameters. For example, in the embodiment where the communication is established using AT modem commands, the first two characters received in the character sequence indicate parameters such as even, odd or no parity, and the number of stop bits.
According to another aspect of the invention, the parameter detection module is reset immediately upon the completion of a message to the entity. In this manner, the parameter detection module is immediately ready to receive and detect a subsequent AT command from the entity.
One advantage of the invention is that the parameter detection module can be implemented to perform these functions without the need to implement an additional processor to set up the communication parameters. Additionally, utilizing a parameter detection module to perform these features frees the processor from having to devote a portion of its time to establishing the communication parameters.
According to one embodiment, a system for detecting and configuring the parameters of a communication between a processor-based system and another entity includes a receiver and transmitter configured to receive data from the other entity and provide the received data to the processor system, and to transmit data from the processor system to the other entity across a communication channel. A precision time generator generates one or more timing signals from a reference clock signal, which are used by the receiver/transmitter to sample received data and to output transmitted data. A parameter detection circuit, detects the receipt of a valid communication, determines the data rate of the communication, and determines other parameters of the communication. The parameter detection circuit is further configured to set up the precision time generator to provide a timing signal at the appropriate rate to sample data associated with said valid communication, and to configure the receiver/transmitter with the determined parameters of the communication.
Further features and advantages of the invention as well as the structure and operation of various embodiments of the invention are described in detail below with reference to the accompanying drawings.